from fastapi import Request, APIRouter

index_routers = APIRouter()


@index_routers.get("/", include_in_schema=False)
async def index(request: Request):
    with open('README.md', 'r') as f:
        content = f.read()
    global_data = {'request': request, 'content': content or ''}
    return request.app.state.render('index.html', **global_data)
